package com.iflytek.day26;

import java.io.FileInputStream;
import java.io.IOException;

public class _07_FileInputStreamDemo {
  public static void main(String[] args) throws IOException {
    // 创建字节输入流对象
    FileInputStream fis = new FileInputStream("src\\com\\iflytek\\day26\\fos.txt");

    byte[] bys = new byte[1024]; // 1024及其整数倍
    int len;
    // 循环读取
    while ((len = fis.read(bys)) != -1) {
      System.out.print(new String(bys, 0, len));
    }
    // 释放资源
    fis.close();
  }
}
